<?php
/**
 * SocialEngine
 *
 * @category   Application_Extensions
 * @package    Vote
 * @copyright  Copyright KEENONWEB LLC
 * @license    http://www.keenonweb.com/
 * @version    $Id: Style.php 2011-03-09 08:45:41Z idris $
 * @author     Idris
 */

/**
 * @category   Application_Extensions
 * @package    Vote
 * @copyright  Copyright KEENONWEB LLC
 * @license    http://www.keenonweb.com/
 */

class Vote_Form_Style extends Engine_Form {
	public function init() {
		$this->setTitle ( 'Voting Styles' )->setMethod ( 'post' )->setAction ( Zend_Controller_Front::getInstance ()->getRouter ()->assemble ( array () ) )->setAttrib ( 'class', 'global_form_popup' );
		
		$this->removeDecorator ( 'FormWrapper' );
		
		$this->addElement ( 'Textarea', 'style', array ('label' => 'Custom Voting Styles', 'description' => 'You can change the colors, fonts, and styles of your voting by adding CSS code below. The contents of the text area below will be output between <style> tags on your voting.' ) );
		$this->style->getDecorator ( 'Description' )->setOption ( 'placement', 'APPEND' );
		
		$this->addElement ( 'Button', 'submit', array ('label' => 'Save Changes', 'type' => 'submit', 'ignore' => true, 'decorators' => array ('ViewHelper' ) ) );
		
		$this->addElement ( 'Cancel', 'cancel', array ('label' => 'cancel', 'link' => true, 'prependText' => ' or ', 'onclick' => 'parent.Smoothbox.close();', 'decorators' => array ('ViewHelper' ) ) );
		
		$this->addDisplayGroup ( array ('submit', 'cancel' ), 'buttons' );
		$this->addElement ( 'Hidden', 'id' );
	}
}